package bom.service.impl.organization;


import bom.dao.organization.UserAssociateRoleDao;
import bom.pojo.organization.User;
import bom.service.i.organization.UserAssociateRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author linzf
 **/
@Service
@Transactional(rollbackFor = {IllegalArgumentException.class})
public class UserAssociateRoleServiceImpl implements UserAssociateRoleService {
    @Autowired(required = false)
    private UserAssociateRoleDao userAssociateRoleDao;

    /**
     * 功能描述：根据用户的ID来删除用户的权限数据
     *
     * @param user
     * @return
     */
    public boolean removeUserRole(User user) {
        return userAssociateRoleDao.removeUserRole(user) > 0;
    }
}